package red.uec.model;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class PasswordModificationRequest extends RestfulRequest {
    private static final long serialVersionUID = -3232648051963116795L;

//    @NotNull(message = "操作非法")
    private String userId;

    @NotNull(message = "请输入原密码")
    @Pattern(regexp = "^.{8,20}$",
            message = "请输入正确的原密码（8-20个字符）")
    private String originPassword;

    @NotNull(message = "请输入新密码")
    @Pattern(regexp = "^.{8,20}$",
            message = "请输入正确的新密码（8-20个字符）")
    private String newPassword;
}
